/*
 * GarbageCharTask.java
 *
 * Created on March 2, 2007, 4:13 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package Comm.Util;

import Experience.ExpUI;
import java.util.TimerTask;

/**
 *
 * @author dmgreen
 */
public class FollowupTask extends TimerTask {
    
    private int myLocalSampleID;
    
    /** Creates a new instance of GarbageCharTask */
    public FollowupTask(int local_sample_id) {
        myLocalSampleID  = local_sample_id;
    }
            
    public void run() {
        
        // not sure if ths is ok - does this run in main thread, or in separate?
        
        while (ExpUI.getMIDlet().getCurrentSample() != null) {
            try {
                Thread.sleep(10000);
            } catch (InterruptedException ie) {
                continue;
            }
        }
        
        // how to get this to run in the main thread ?!?
        ExpUI.getMIDlet().startNewFollowup(myLocalSampleID);
    }
}
